Figures

  • Normalization: Negcon normalization
  • mAP calculation: mAP is calculated as difference to controls.
In [ ]:
### Modules import
import plotly.express as px
from plotly.subplots import make_subplots
import plotly.graph_objects as go
import plotly.io as pio
import pandas as pd

Reading the dataframes¶

In [ ]:
combined_moa_df = pd.read_csv('copairs_csv\\PrecisionValues_with_MoA_allplates_Negcon_wrt_Controls.csv')

Comparison of Mean average precision¶

Standard cellpainting data vs Tocris mitobrilliant¶
In [ ]:
mito_fig =px.scatter(combined_moa_df, x =combined_moa_df['average_precision_std'], y=combined_moa_df['average_precision_mito'],labels={'average_precision_std':'Mean average precision - Standard CellPainting dyes', 'average_precision_mito':'Mean average precision - <br> Tocris Mitobrilliant 647'}, color=combined_moa_df['MoA'])
mito_fig.update_layout(legend=dict(orientation="h"), height=800, width=1000)
mito_fig.show('notebook')
Standard cellpainting data vs Phalloidin 400LS¶
In [ ]:
actin_fig = px.scatter(combined_moa_df, x =combined_moa_df['average_precision_std'], y=combined_moa_df['average_precision_act'],labels={'average_precision_std':'Mean Average Precision - Standard CellPainting dyes', 'average_precision_act':'Mean Average Preicison - <br> Phalloidin 400LS (long-stoke shifted)'}, color=combined_moa_df['MoA'])
actin_fig.update_layout(legend=dict(orientation="h"), height=800, width=1000)
actin_fig.show('notebook')

Mean average precision values of all compounds¶

In [ ]:
combined_box_plot = go.Figure()

combined_box_plot.add_trace(go.Box(y=combined_moa_df['average_precision_std'], name = 'Standard Cellpainting dyes', boxpoints='all', hovertext=combined_moa_df['MoA']+'-'+ combined_moa_df['Common Name']))
combined_box_plot.add_trace(go.Box(y=combined_moa_df['average_precision_mito'], name = 'Tocris MitoBrilliant', boxpoints='all', hovertext=combined_moa_df['MoA']+'-'+ combined_moa_df['Common Name']))
combined_box_plot.add_trace(go.Box(y=combined_moa_df['average_precision_act'], name = 'Phalloidin 400LS', boxpoints='all', hovertext=combined_moa_df['MoA']+'-'+ combined_moa_df['Common Name']))
combined_box_plot.update_layout(height=800,width=1000, font_family='Arial', font=dict(size=14, color='Black'), boxmode='group',yaxis_title = 'Mean average precision')
combined_box_plot.show('notebook')

Mean average precision values - MoA¶

In [ ]:
scatter_plot = go.Figure()
scatter_plot.add_trace(go.Scatter(x=combined_moa_df['MoA'], y=combined_moa_df['average_precision_std'],hovertext=combined_moa_df['Common Name'], mode='markers', name = 'Standard Cellpainting dyes'))
scatter_plot.add_trace(go.Scatter(x=combined_moa_df['MoA'], y=combined_moa_df['average_precision_mito'],hovertext=combined_moa_df['Common Name'], mode='markers', name = 'Tocris MitoBrilliant'))
scatter_plot.add_trace(go.Scatter(x=combined_moa_df['MoA'], y=combined_moa_df['average_precision_act'],hovertext=combined_moa_df['Common Name'], mode='markers', name = 'Phalloidin 400LS'))
scatter_plot.update_layout(height=1000,width=1500, font_family='Arial', font=dict(size=14, color='Black'), boxmode='group',yaxis_title = 'Mean average precision',  legend=dict(yanchor="top",y=0.99,xanchor="left",x=0.01))
scatter_plot.update_xaxes(tickangle=90, categoryorder='total ascending')
scatter_plot.show('notebook')

Difference in mean average precision values¶

Standard Cellpainting dyes vs Tocris MitoBrilliant¶

The negative values indicate the better performance of Tocris MitoBrilliant

In [ ]:
fig = go.Figure()
fig.add_trace(go.Scatter(x=combined_moa_df['MoA'], y=combined_moa_df['std_vs_mito'],mode='markers', hovertext=combined_moa_df['Common Name']))
fig.update_layout(height=1000,width=1700, font_family='Arial', font=dict(size=14, color='Black'))
fig.update_yaxes(title='Difference in <br> Mean average precision')
fig.update_xaxes(categoryorder='total ascending')
fig.show('notebook')
Standard Cellpainting dyes vs Phalloidin 400LS¶

The negative values indicate the better performance of Phalloidin 400LS

In [ ]:
fig = go.Figure()
fig.add_trace(go.Scatter(x=combined_moa_df['MoA'], y=combined_moa_df['std_vs_act'],mode='markers', hovertext=combined_moa_df['Common Name']))
fig.update_layout(height=1000,width=1700, font_family='Arial', font=dict(size=14, color='Black'))
fig.update_yaxes(title='Difference in <br> Mean average precision')
fig.update_xaxes(categoryorder='total ascending')
fig.show('notebook')
In [ ]: